/*
 * @Author: WuFeng <763467339@qq.com>
 * @Date: 2022-07-16 00:58:26
 * @LastEditTime: 2022-07-21 16:51:24
 * @LastEditors: WuFeng <763467339@qq.com>
 * @Description: 系统部门管理
 * @FilePath: \vue3-element-plus-web\src\api\SysManage\dept.js
 * @Copyright 版权声明
 */
import request from '@/utils/request'
import qs from 'qs'

/**
 * @description 获取列表
 */
export function getList(params) {
  const data = params
  return request({
    url: '/dept/page',
    method: 'get',
    params: data
  })
}

/**
 * @description 添加保存
 * @param {*} params
 */
export function addSave(params) {
  const data = params
  return request({
    url: '/dept/save',
    method: 'post',
    data
  })
}

/**
 * @description 编辑保存
 * @param {*} params
 */
export function updateSave(params) {
  const data = params
  return request({
    url: '/dept/submit',
    method: 'post',
    data
  })
}

/**
 * @description 删除保存
 * @param {*} params
 */
export function deleteSave(params) {
  const data = params
  return request({
    url: '/dept/remove',
    method: 'post',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
    data: qs.stringify(data)
  })
}

/**
 * @description 获取 树
 */
export function getTree(params) {
  const data = params
  return request({
    url: '/dept/tree',
    method: 'get',
    params: data
  })
}

export default {}
